#pragma once
#include "dxroids.h"
#include "GameObject.h"
#include <memory>
#include <utility>

namespace dxroids
{   
   class SpaceRock : public GameObject
   {  

   public:

      enum Size { Big, Medium, Small };
      enum Style { A, B, C };
            
      typedef std::pair<std::unique_ptr<SpaceRock>, std::unique_ptr<SpaceRock>> Pair;

      SpaceRock(Vector _pos, Size _size, Style _style);      
      virtual ~SpaceRock();

      Size GetSize() const;
      Pair Break(std::shared_ptr<SoundManager> const & _sound_manager);    

   private:      

      virtual DXROIDS_COM_PTR<ID2D1Geometry> CreateGeometry(
         DXROIDS_COM_PTR<ID2D1Factory> const & _factory, float _scale) override;  

      std::unique_ptr<SpaceRock> CloneAndShrink();

   private:

      float angle_;
      float rational_velocity_;

      Size size_;
      Style style_;
            
      DXROIDS_COM_PTR<ID2D1Geometry> gemoetry_;
   };
}

inline dxroids::SpaceRock::Size dxroids::SpaceRock::GetSize() const
{
   return size_;
}
